<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			//设置
			localStorage.setItem("username", "hongwei");
			//获取
			var value = localStorage.getItem("username");
			console.log(value);
			//删除
			localStorage.removeItem("username");
			//清除所有
			localStorage.clear();
		</script>
	</body>
</html>
